<template>
  <div class="cmp-result">
    <div v-if="result == null" class="placeholder">
      (暂无结果)
    </div>
    <CmpResultBox v-else :data="result" />
  </div>
</template>

<script>
import { mapState } from 'vuex'
import CmpResultBox from '@/components/CmpResultBox'

export default {
  name: 'CmpResult',
  components: {
    CmpResultBox
  },
  data() {
    return {
    }
  },
  computed: {
    ...mapState({
      result: state => state.result,
    }),
  }
}
</script>

<style scoped lang="scss">
.placeholder {
  opacity: 0.5;
}
</style>
